﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Object One/Admin.Master" AutoEventWireup="true" CodeBehind="Distance.aspx.cs" Inherits="ProjectHK3.Object_One.Distance" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="text-align: center">
        <table style="width:65%;" align="center">
            <tr>
                <td style="text-align: left; height: 41px" colspan="3">
                    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="45pt" ForeColor="#FF6600" Text="๖ۣۜDistances ๖ۣۜManagement"></asp:Label></td>
            </tr>
            <tr>
                <td style="text-align: left; width: 134px; height: 41px">
                    &nbsp;</td>
                <td style="text-align: left; width: 234px; height: 41px">
                    &nbsp;</td>
                <td style="height: 41px; text-align: left;">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="text-align: left; width: 134px; height: 41px">
                    <asp:Label ID="Label5" runat="server" Text="KM From:"></asp:Label>
                </td>
                <td style="text-align: left; width: 234px; height: 41px">
                    <asp:TextBox ID="TextBox1" runat="server" Width="210px"></asp:TextBox>
                </td>
                <td style="height: 41px; text-align: left;">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="Not Blank!" ForeColor="Red" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="text-align: left; width: 134px; height: 41px">
                    &nbsp;</td>
                <td style="text-align: left; width: 234px; height: 41px">
                    &nbsp;</td>
                <td style="height: 41px; text-align: left;">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 134px; text-align: left">
                    <asp:Label ID="Label6" runat="server" Text="KM To:"></asp:Label>
                </td>
                <td style="width: 234px; text-align: left">
                    <asp:TextBox ID="TextBox2" runat="server" Width="210px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" ErrorMessage="Not Blank!" ForeColor="Red" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
                <td style="text-align: left">
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Object One/images/1389547665_search.png" OnClick="ImageButton1_Click" />
                </td>
            </tr>
        </table>

        <br />
        <table style="width: 65%;" align="center">
            <tr>
                <td style="text-align: left; width: 275px; height: 41px;">
                    <asp:HyperLink ID="HyperLink1" runat="server" ForeColor="#FF6600" NavigateUrl="~/Object One/CreateDistance.aspx">Create New Distance</asp:HyperLink>
                </td>
                <td style="height: 41px">
                    <asp:Label ID="Label7" runat="server" Text="Total:" ForeColor="Blue"></asp:Label>
                    <asp:Label ID="Label8" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" PageSize="15" CellPadding="4" ForeColor="#333333" GridLines="None">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="BRANCH FROM">
                                <ItemTemplate>
                                    <asp:LinkButton ID="_lbtBranchFromDetails" runat="server" CommandArgument='<%# Eval("DISTANCE_ID") %>' Text='<%# Eval("BRANCH_ID_FROM") %>' ToolTip="View Branch Details"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="BRANCH TO">
                                <ItemTemplate>
                                    <asp:LinkButton ID="_lbtBranchToDetails" runat="server" CommandArgument='<%# Eval("DISTANCE_ID") %>' Text='<%# Eval("BRANCH_ID_TO") %>' ToolTip="View Branch Details"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="KM">
                                <ItemTemplate>
                                    <asp:Label ID="_lblKM" runat="server" Enabled="True" Text='<%# Eval("KM") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ACTIONS">
                                <ItemTemplate>
                                    <asp:LinkButton ID="_lbtDelete" runat="server" CommandArgument='<%# Eval("DISTANCE_ID") %>' CommandName="RemoveDistance" OnClientClick="return confirm('Are you sure you want to delete this record ?')" OnCommand="_lbtDelete_Command" ToolTip="Remove  Distance" CausesValidation="False">Remove</asp:LinkButton>
                                    &nbsp; &nbsp;
                                    <asp:LinkButton ID="_lbtDetails" runat="server" CommandArgument='<%# Eval("DISTANCE_ID") %>' CommandName="ViewDistanceDetails" OnCommand="_lbtDetails_Command" ToolTip="View Distance Details" CausesValidation="False" OnClick="_lbtDetails_Click">View Details</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </td>
            </tr>
        </table>

    </div>
</asp:Content>
